package com.example.therDays.ui.components.prediction


import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

import com.example.therDays.R
import com.example.therDays.ui.model.entity.PredictionModel

@Composable
fun PredictionItem(predictionModel: PredictionModel) {
    Column(
        modifier = Modifier
            .height(140.dp)
            .width(86.dp)
            .padding(4.dp)
            .clip(RoundedCornerShape(12.dp))
            .background(Color(0xFFFBFBFB)),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.SpaceAround
    ) {
        Image(painter = painterResource(id = R.drawable.group21), contentDescription = null, modifier = Modifier.size(44.dp))
        Text(text = "${predictionModel.temperature}°C", style = TextStyle(
            fontSize = 20.sp
        ))
        Text(text = predictionModel.time, style = TextStyle(
            fontSize =14.sp
        ),
        modifier = Modifier.padding(bottom = 10.dp))
    }
}


